import type { shopStatusValues } from '@/lib/db/schema/enum';
import type { adminListShopsByPage, getShop, getShopById } from '../query/shop';

export type ShopType = NonNullable<
  Awaited<ReturnType<typeof getShop>>['result']
>;

export type ShopWithProduct = NonNullable<
  Awaited<ReturnType<typeof getShopById>>['result']
>;

export type ShopSummary = NonNullable<
  Awaited<ReturnType<typeof adminListShopsByPage>>['result']
>['data'][number];

export const shopStatusMap: Record<(typeof shopStatusValues)[number], string> =
  {
    unreviewed: '未审核',
    reviewing: '审核中',
    rejected: '审核不通过',
    warning: '警告中',
    closed: '已关停',
    normal: '正常运营',
  };
